<% layout("/common/layout.html",{"title":"流程列表"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>新闻列表</h2>
       <ol class="breadcrumb">
			<li><a href="${ctxPath}/admin/main">主页</a></li>
			<li>新闻列表</li>
		</ol>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="row">
    
        <form id="searchForm">
            <div class="ibox-content m-b-sm border-bottom">
                <div class="row">

                    <div class="col-sm-4">
                        <div class="form-group">
                            <label class="control-label" for="titleSearch">新闻标题：</label>
                            <input type="text" class="form-control" id="titleSearch" name="titleSearch" placeholder="新闻标题，支持模糊查询">
                        </div>
                    </div>

                     <div class="col-sm-2">
                        <div class="form-group">
                            <label class="control-label" for="newsTypeSearch">新闻类型：</label>
                            <select class="form-control" id="newsTypeSearch" name="newsTypeSearch">
                             <option value="" >全部</option>
                              <option value="1" >政治</option>
                                    <option value="2" >公示</option>
                                    <option value="3" >民生</option>
                            </select>
                        </div>
                    </div> 
                    
                     <div class="col-sm-2">
                        <div class="form-group">
                            <label class="control-label" for="newsStatusSearch">新闻状态：</label>
                            <select class="form-control" id="newsStatusSearch" name="newsStatusSearch">
                               <option value="" >全部</option>
                              <option value="1" >普通</option>
                               <option value="2">置顶</option>
                            </select>
                        </div>
                    </div> 


                    <div class="col-sm-2 pull-right">
                        <div class="form-group">
                            <label class="control-label" for="search">&nbsp;</label>
                            <div class="btn-block text-right">
                                <button type="button" id="search-btn" class="btn btn-primary "><i class="fa fa-search"></i>&nbsp;搜 索&nbsp;</button>
                                <button type="reset" id="reset" class="btn btn-danger"><i class="fa fa-undo"></i>&nbsp;重 置&nbsp;</button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </form>
        

        <div class=" animated fadeInDown">
            <div class="mail-box">
                <div class="ibox-content">
                    <table id="dataList"></table>
                    <div class="toolBar pull-left">
                            <div class="btn-group">
                                <a href="saveForm" class="btn btn-primary btn-outline "><i class="fa fa-plus-square" aria-hidden="true"></i>&nbsp;添加新闻</a>
                            </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['news/newsInfo'], function (newsInfo) {
    	newsInfo.list();
    });
     //列表参数
    function operateFormatter(value, row, index) {
        var tempCode = "";
        tempCode += '<button type="button" class="update btn btn-white">&nbsp;<i class="fa fa-trash"></i>&nbsp;修改&nbsp;</button>';
        tempCode += '<button type="button" class="delete btn btn-white">&nbsp;<i class="fa fa-trash"></i>&nbsp;删除&nbsp;</button>';
        return '<div class="btn-group btn-group-xs">' + tempCode + '</div>';
    } 
     
</script>